import fsExtra from 'fs-extra';
import path from 'path';

export function readProjList() {
  const projListJSON = fsExtra.readJSONSync(path.join(this.$globalConst.userDataPath, 'ProjList.json'), { throws: false });
  if (projListJSON === null || projListJSON.length === 0) {
    return null;
  }
  return projListJSON;
}

export function writeProjList(json) {
  fsExtra.writeJSONSync(path.join(this.$globalConst.userDataPath, 'ProjList.json'), json);
}
